import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const deptTree = () => request({
    url: baseUrl + '/admin/dept/tree',
    method: 'get',
});

export const saveDept = (data) => request({
    url: baseUrl + '/admin/dept/add',
    method: 'post',
    data: data
});

export const updateDept = (data) => request({
    url: baseUrl + '/admin/dept/update',
    method: 'put',
    data: data
});

export const deleteDept = (id) => request({
    url: baseUrl + '/admin/dept/delete/'+id,
    method: 'delete',
});

